package com.hmall.hmallapi.fallback;

import com.hmall.hmallapi.api.ItemService;
import com.hmall.hmallapi.api.UserService;
import com.hmall.hmallapi.dto.ItemDTO;
import com.hmall.hmallapi.dto.OrderDetailDTO;
import com.hmall.hmallcommon.exception.BizIllegalException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
 * @author malty
 */
@Slf4j
public class UserServiceFallBack implements FallbackFactory {
    @Override
    public UserService create(Throwable cause) {
        return (pw, amount) -> {
            throw new BizIllegalException(cause);
        };
    }
}
